<?php
namespace common\models\approval;

class UsersProvider implements \Lhjx\Module\Approval\App\Interfaces\UsersProviderInterface
{
    /**
     * 所有的用户数组
     *
     * @return array
     */
    public function usersMap(){

    }

    /**
     * 用户信息
     *
     * @param int $userId
     * @return mixed
     */
    public function userInfo(int $userId)
    {
        return [
            'name' => 'hello',
            'userInfo' => ['position' => '项目经理', 'dingId' => '12345']
        ];
    }

    /**
     * 获得所有在 userIds 组内的用户的信息
     *
     * @param array $userIds
     * @return mixed
     */
    public function getUsersInfo(array $userIds)
    {
        return [
            [
                'userId' => 1,
                'userName' => 'hello',
//                'userInfo' => ['position' => '项目经理', 'dingId' => '12345']
                'position' => '项目经理',
                'dingId' => '12345',
            ],
        ];
    }
}